import pygame
import sys
from pygame_ok.my_class import TheRect

# pygame 最小框架

pygame.init()
# Create a window
screen = pygame.display.set_mode((500, 200))
# Set title
pygame.display.set_caption('屁歪game')
fclock = pygame.time.Clock()
myrect=TheRect(50,50,50,50,(255,255,255))
game_running = True
while game_running:
    screen.fill((0, 255, 0))
    myrect.move(2,2)
    myrect.draw(screen)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
        # if event.type == 12:
            # game_running = False
            pygame.quit()
            sys.exit()
    pygame.display.update()
    fclock.tick(30)
